package com.masterclient.app.businessmodule.minemodule.api;

import com.eoner.baselib.container.CommonBaseResponse;
import com.eoner.baselibrary.bean.personal.GivingListBean;
import com.eoner.baselibrary.bean.personal.MedalDetailBean;
import com.eoner.baselibrary.bean.personal.OtherMsgBean;
import com.eoner.managerlibrary.netsign.core.FCRetrofitManager;
import com.masterclient.app.businessmodule.minemodule.index.tutor.InviteInfoBean;
import com.masterclient.app.businessmodule.minemodule.point.model.PointMainBean;
import com.masterclient.app.businessmodule.minemodule.withdraw.bean.WithDrawSuccessBean;

import io.reactivex.Observable;
import okhttp3.RequestBody;

public class MineHttpService {

    private static MineApi api;
    private static MineHttpService instance;
    public static MineHttpService getInstance() {
        synchronized (MineHttpService.class){
            if(instance == null){
                instance = new MineHttpService();
            }
        }
        return instance;
    }

    private MineHttpService() {
        api = FCRetrofitManager.getInstance().getRetrofit().create(MineApi.class);
    }

    /**
     * 获取邀请好友信息
     * */
    public io.reactivex.Observable<CommonBaseResponse<InviteInfoBean>> getShareInfo() {
        return  api.getShareInfo();
    }

    /**
     * 获取勋章
     * */
    public io.reactivex.Observable<MedalDetailBean> medalInfoGet(String medal_id) {
        return  api.medalInfoGet(medal_id);
    }

    /**
     * 清除我的足迹
     */
    public Observable<CommonBaseResponse> clearFootPrintInfo() {
        return  api.clearFootPrintInfo();
    }

    /**
    * 提现
    * */
    public Observable<WithDrawSuccessBean> balanceCashAdd(RequestBody body) {
        return api.balanceCashAdd(body);
    }

    /**
     * 金币
     * */
    public Observable<CommonBaseResponse<PointMainBean>> pointMain() {
        return api.pointMain();
    }

    /**
     * 消息
     * */
    public io.reactivex.Observable<GivingListBean> getNoticeList() {
        return api.getNoticeList();
    }

    /**
     * 消息中心--其他消息
     * */
    public Observable<CommonBaseResponse<OtherMsgBean>> getOtherMsg(String page) {
        return api.getOtherMsg(page);
    }

}
